import {request} from '@umijs/max';



//列表数据
export function getClassList(body:API.Class_List_Body) {
  return request<API.PageInfo<API.ClassInfo>>('/class/list', {
    method: 'POST',
    data: body,
  });
}
//新增
export function addClass(body:API.Class_Add_Body) {
  return request<number>('/class/add', {
    method: 'POST',
    data: body,
  });
}
//编辑
export function updateClass(body:API.Class_Update_Body) {
  return request<null>('/class/update', {
    method: 'POST',
    data: body,
  });
}
//开课
export function beginClass(body:API.Class_Begin_Body) {
  return request<string>('/class/begin', {
    method: 'POST',
    data: body,
  });
}
//结课
export function endClass(body:API.Class_End_Body) {
  return request<string>('/class/end', {
    method: 'POST',
    data:body
  })
}
//员工列表
export function categoryStaffList(stf_category:number) {
  return request<API.StaffInfo[]>(`/staff/listbycategory/${stf_category}}`);
}